Skip to content

net: add BlockList network policy variant - #25

Merged
danbugs merged 1 commit into
mainfrom
blocklist
May 14, 2026
Merged

net: add BlockList network policy variant#25
danbugs merged 1 commit into
mainfrom
blocklist

Conversation

@danbugs

@danbugs danbugs commented May 14, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add BlockList struct and NetworkPolicy::BlockList variant — deny specific hosts while allowing all other destinations
  • Reuses the same hostname resolution and CDN re-resolution pattern as AllowList with inverted logic
  • DNS (port 53) always passes through blocklists so hostname-based policies still work
  • Add --net-block CLI flag to both hyperlight-unikraft and pyhl (mutually exclusive with --net-allow)
  • 7 new unit tests covering permit/deny/DNS/hostname resolution/tool registration

Signed-off-by: danbugs <danilochiarlone@gmail.com>

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linux Benchmarks

Details
Benchmark suite Current: b221fec Previous: 5f424bb Ratio
hello_world (median) 20 ms 20 ms 1
pandas (median) 100 ms 80 ms 1.25
density (per VM) 7 MB 7 MB 1
snapshot (disk) 385 MiB 385 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

@danbugs
danbugs enabled auto-merge May 14, 2026 21:44

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Windows Benchmarks

Details
Benchmark suite Current: b221fec Previous: 5f424bb Ratio
hello_world (median) 236 ms 260 ms 0.91
pandas (median) 706 ms 817 ms 0.86
density (per VM) 6 MB 6 MB 1
snapshot (disk) 393 MiB 393 MiB 1

This comment was automatically generated by workflow using github-action-benchmark.

@danbugs
danbugs merged commit 0eb9887 into main May 14, 2026
78 checks passed
@danbugs
danbugs deleted the blocklist branch May 14, 2026 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant